package com.bby.common.model;

import com.sun.management.OperatingSystemMXBean;
import lombok.Data;
import lombok.experimental.Accessors;

import java.lang.management.ManagementFactory;
import java.util.Map;
import java.util.Properties;

@Data
@Accessors(chain = true)
public class RunningStatus {
    public static OperatingSystemMXBean osmxb = (OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean();
    long memoryTotal = osmxb.getTotalPhysicalMemorySize();
    long memoryFree = osmxb.getFreePhysicalMemorySize();
    long processCpuTime = osmxb.getProcessCpuTime();
    double processCpuLoad = osmxb.getProcessCpuLoad();
    double systemCpuLoad = osmxb.getSystemCpuLoad();
    Map<String,String> info;

     public static RunningStatus create() {
        return new RunningStatus();
    }
}
